/*
 * Copyright 2009-2010 Belmont Software Services
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.belmont.backup.gui;

import com.belmont.backup.Utils;

public class CheckBoxNode  {
    private String name;
    private String modifiedDate;
    private String checksum;
    private String fullPath;
    private String toolTip;
    private boolean selected;
    private long size;

    public CheckBoxNode(String name, String fullPath, String modifiedDate, String checksum, long size, boolean selected) {
	this.name = name;
	this.fullPath = fullPath;
	this.modifiedDate = modifiedDate;
	this.checksum = checksum;
	this.selected = selected;
	this.size = size;
	this.toolTip = "["+Utils.formatSize(size)+", "+modifiedDate+"]";
    }

    public CheckBoxNode(BNRCheckBox n) {
	this(n.name, n.fullPath, n.modifiedDate, n.checksum, n.size, n.isSelected());
    }

    public String getToolTip() {
	return toolTip;
    }

    public long getSize() {
	return size;
    }

    public boolean isSelected() {
	return selected;
    }

    public void setSelected(boolean newValue) {
	selected = newValue;
    }

    public String getName() {
	return name;
    }

    public String getChecksum() {
	return checksum;
    }

    public String getModifiedDate() {
	return modifiedDate;
    }

    public String getFullPath() {
	return fullPath;
    }

    public void setName(String newValue) {
	this.name = newValue;
    }

    public void setFullPath(String newValue) {
	fullPath = newValue;
    }

    public String toString() {
	return "[" + name + "/" + selected + "::"+fullPath+ "]";
    }
}